import React, { Component } from 'react'
import '../assets/style/chatList_c.less'

import Img from './Img_c';

export default class ChatList extends Component {
    render() {
        return (
            <div className="ChatList" onClick={this.props.onClick}>
                <div className="body">
                    <div className="left">
                        <Img src={this.props.src}></Img>
                        <div>
                            <p className="title">{this.props.username}</p>
                            <p>{this.props.msg}</p>
                        </div>
                    </div>
                    <p>{this.props.time}</p>
                </div>
            </div>
        )
    }
}
